Optimal. Leaf size=122 \[ \frac {d^2 x}{4 a f^2}+\frac {(c+d x)^2}{4 a f}+\frac {(c+d x)^3}{6 a d}-\frac {d^2}{4 f^3 (a+a \tanh (e+f x))}-\frac {d (c+d x)}{2 f^2 (a+a \tanh (e+f x))}-\frac {(c+d x)^2}{2 f (a+a \tanh (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {3804, 3560, 8}
\begin {gather*} -\frac {d (c+d x)}{2 f^2 (a \tanh (e+f x)+a)}-\frac {(c+d x)^2}{2 f (a \tanh (e+f x)+a)}+\frac {(c+d x)^2}{4 a f}+\frac {(c+d x)^3}{6 a d}-\frac {d^2}{4 f^3 (a \tanh (e+f x)+a)}+\frac {d^2 x}{4 a f^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3560
Rule 3804
Rubi steps
\begin {align*} \int \frac {(c+d x)^2}{a+a \tanh (e+f x)} \, dx &=\frac {(c+d x)^3}{6 a d}-\frac {(c+d x)^2}{2 f (a+a \tanh (e+f x))}+\frac {d \int \frac {c+d x}{a+a \tanh (e+f x)} \, dx}{f}\\ &=\frac {(c+d x)^2}{4 a f}+\frac {(c+d x)^3}{6 a d}-\frac {d (c+d x)}{2 f^2 (a+a \tanh (e+f x))}-\frac {(c+d x)^2}{2 f (a+a \tanh (e+f x))}+\frac {d^2 \int \frac {1}{a+a \tanh (e+f x)} \, dx}{2 f^2}\\ &=\frac {(c+d x)^2}{4 a f}+\frac {(c+d x)^3}{6 a d}-\frac {d^2}{4 f^3 (a+a \tanh (e+f x))}-\frac {d (c+d x)}{2 f^2 (a+a \tanh (e+f x))}-\frac {(c+d x)^2}{2 f (a+a \tanh (e+f x))}+\frac {d^2 \int 1 \, dx}{4 a f^2}\\ &=\frac {d^2 x}{4 a f^2}+\frac {(c+d x)^2}{4 a f}+\frac {(c+d x)^3}{6 a d}-\frac {d^2}{4 f^3 (a+a \tanh (e+f x))}-\frac {d (c+d x)}{2 f^2 (a+a \tanh (e+f x))}-\frac {(c+d x)^2}{2 f (a+a \tanh (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.17, size = 169, normalized size = 1.39 \begin {gather*} \frac {\text {sech}(e+f x) (\cosh (f x)+\sinh (f x)) \left (\left (2 c^2 f^2+2 c d f (1+2 f x)+d^2 \left (1+2 f x+2 f^2 x^2\right )\right ) \cosh (2 f x) (-\cosh (e)+\sinh (e))+\frac {4}{3} f^3 x \left (3 c^2+3 c d x+d^2 x^2\right ) (\cosh (e)+\sinh (e))+\left (2 c^2 f^2+2 c d f (1+2 f x)+d^2 \left (1+2 f x+2 f^2 x^2\right )\right ) (\cosh (e)-\sinh (e)) \sinh (2 f x)\right )}{8 a f^3 (1+\tanh (e+f x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 3.70, size = 103, normalized size = 0.84
method | result | size |
risch | \(\frac {d^{2} x^{3}}{6 a}+\frac {d c \,x^{2}}{2 a}+\frac {c^{2} x}{2 a}+\frac {c^{3}}{6 a d}-\frac {\left (2 d^{2} x^{2} f^{2}+4 c d \,f^{2} x +2 c^{2} f^{2}+2 d^{2} f x +2 c d f +d^{2}\right ) {\mathrm e}^{-2 f x -2 e}}{8 a \,f^{3}}\) | \(103\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.32, size = 132, normalized size = 1.08 \begin {gather*} \frac {1}{4} \, c^{2} {\left (\frac {2 \, {\left (f x + e\right )}}{a f} - \frac {e^{\left (-2 \, f x - 2 \, e\right )}}{a f}\right )} + \frac {{\left (2 \, f^{2} x^{2} e^{\left (2 \, e\right )} - {\left (2 \, f x + 1\right )} e^{\left (-2 \, f x\right )}\right )} c d e^{\left (-2 \, e\right )}}{4 \, a f^{2}} + \frac {{\left (4 \, f^{3} x^{3} e^{\left (2 \, e\right )} - 3 \, {\left (2 \, f^{2} x^{2} + 2 \, f x + 1\right )} e^{\left (-2 \, f x\right )}\right )} d^{2} e^{\left (-2 \, e\right )}}{24 \, a f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.60, size = 204, normalized size = 1.67 \begin {gather*} \frac {{\left (4 \, d^{2} f^{3} x^{3} - 6 \, c^{2} f^{2} - 6 \, c d f + 6 \, {\left (2 \, c d f^{3} - d^{2} f^{2}\right )} x^{2} - 3 \, d^{2} + 6 \, {\left (2 \, c^{2} f^{3} - 2 \, c d f^{2} - d^{2} f\right )} x\right )} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + {\left (4 \, d^{2} f^{3} x^{3} + 6 \, c^{2} f^{2} + 6 \, c d f + 6 \, {\left (2 \, c d f^{3} + d^{2} f^{2}\right )} x^{2} + 3 \, d^{2} + 6 \, {\left (2 \, c^{2} f^{3} + 2 \, c d f^{2} + d^{2} f\right )} x\right )} \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )}{24 \, {\left (a f^{3} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + a f^{3} \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {c^{2}}{\tanh {\left (e + f x \right )} + 1}\, dx + \int \frac {d^{2} x^{2}}{\tanh {\left (e + f x \right )} + 1}\, dx + \int \frac {2 c d x}{\tanh {\left (e + f x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 119, normalized size = 0.98 \begin {gather*} \frac {{\left (4 \, d^{2} f^{3} x^{3} e^{\left (2 \, f x + 2 \, e\right )} + 12 \, c d f^{3} x^{2} e^{\left (2 \, f x + 2 \, e\right )} + 12 \, c^{2} f^{3} x e^{\left (2 \, f x + 2 \, e\right )} - 6 \, d^{2} f^{2} x^{2} - 12 \, c d f^{2} x - 6 \, c^{2} f^{2} - 6 \, d^{2} f x - 6 \, c d f - 3 \, d^{2}\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{24 \, a f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.18, size = 187, normalized size = 1.53 \begin {gather*} \frac {{\mathrm {e}}^{-2\,e-2\,f\,x}\,\left (12\,c^2\,x\,{\mathrm {e}}^{2\,e+2\,f\,x}+4\,d^2\,x^3\,{\mathrm {e}}^{2\,e+2\,f\,x}+12\,c\,d\,x^2\,{\mathrm {e}}^{2\,e+2\,f\,x}\right )}{24\,a}-\frac {\frac {{\mathrm {e}}^{-2\,e-2\,f\,x}\,\left (3\,d^2-3\,d^2\,{\mathrm {e}}^{2\,e+2\,f\,x}\right )}{24}+\frac {f\,{\mathrm {e}}^{-2\,e-2\,f\,x}\,\left (6\,c\,d+6\,d^2\,x-6\,c\,d\,{\mathrm {e}}^{2\,e+2\,f\,x}\right )}{24}+\frac {f^2\,{\mathrm {e}}^{-2\,e-2\,f\,x}\,\left (6\,c^2-6\,c^2\,{\mathrm {e}}^{2\,e+2\,f\,x}+6\,d^2\,x^2+12\,c\,d\,x\right )}{24}}{a\,f^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________